home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
adikit.arc
/
SINGLE.LSP
< prev
next >
Wrap
Lisp/Scheme
|
1986-12-01
|
10KB
|
293 lines
(dssetup)
(print " ")
(print "* * * SINGLE SCREEN test program * * *")
(print " ")
; open test result output file...name NNNdisp.lay
(setq testfn (strcat disp8 "." status comnd menu))
(startestout testfn)
(terpri)
(print "When the command prompt is only one line or is configured OFF,")
(print "test questions will be asked from the TEXT screen.")
(print "So, if you need to look at the graphics screen again, ")
(print "or the text screen, use flipscreen BEFORE answering the question")
(terpri)
(print "Yes/No questions must be answered with 'y' 'Y' 'n' or 'N'")
(print "Any other response will result in the prompt being repeated")
(terpri)
(print "When a prompt says Hit RETURN, you can only continue by")
(print "depressing the RETURN key")
(terpri)
(print "* * Hit RETURN when ready to go * *")
(getstring cr)
; the first test should check that config of status, comnd and menu worked
(if (= "Y" comnd) (graphscr) (textscr))
(starttest "First check configuration of COMMAND prompt area")
(if (= "Y" comnd)
(getrslt "There is a COMMAND prompt area, right? ")
(getrslt "There is NO Command Prompt Area, correct? "))
(starttest "Next, check for STATUS LINE")
(if (= "Y" status)
(getrslt "There is a STATUS LINE, right? ")
(getrslt "There is NO Status line, correct? "))
(starttest "Finally, check for MENU AREA")
(if (= "Y" menu)
(getrslt "There is a MENU AREA, right? ")
(getrslt "There is NO Menu area, correct? "))
(textscr)
(terpri)
(print "The BORDER tests start by drawing a pline around the dwg area border")
(print "then messing around with it and asking if all is ok.")
(starttest "The first step DRAWs a PLINE on the edges of the drawing area.")
; draw the pline and ask about it
; assume 0,0 is at lower right of screen so viewctr can be used to
; compute the corners (2 times x and y values of viewctr)
(setq ctrpt (getvar "viewctr"))
(setq x (car ctrpt))
(setq y (cadr ctrpt))
(setq x (* 2 x))
(setq y (* 2 y))
(command "pline" '(0 0) "w" 0 0
(list x 0)
(list x y)
(list 0 y)
(list 0 0)
ctrpt
""
)
(getrslt "Did the PLINE cover the graphics screen edges? ")
;flip to graphics and back to text - ask if all is ok
(terpri)
(starttest "Now, check that FLIPSCREEN doesn't mess things up.")
(textscr)
(wait wtime)
(graphscr)
(getrslt "Did the pline and all of the graphics re-appear? ")
; and one more question...did textscreen leave all that text around?
(starttest "Make sure that the TEXTSCREEN has a screen full of test")
; make sure we go to textscreen always!
(textscr)
(wait wtime)
(getrslt "Does the TEXT screen show the correct # of LINES? (a screen full)")
;make sure GRID works
(starttest "Make sure GRID works")
(command "GRID" "on")
(getrslt "Did the GRID come on? ")
(starttest "Now let's turn GRID off")
(command "GRID" "off")
(getrslt "Did the GRID turn off? ")
;turn the axis on. ask if all is ok
(starttest "Now, check that AXIS ON works ok")
(command "axis" ".5")
(getrslt "Did the axis show up correctly? ")
;make sure flipscreen doesn't lose the axis
(starttest "Make sure flip screen doesn't lose the axis")
(wait 250)
(textscr)
(wait 250)
(graphscr)
(getrslt "Did the AXIS stay after the FLIP SCREENS? ")
;change the axis spacing...
(starttest "Next, check that changed axis spacing doesn't leave old ticks")
(wait 1000)
(command "axis" "2.2")
(getrslt "Did the old axis ticks go away, and only the new ones appear? ")
;turn the axis off. ask if all is ok
(starttest "Now, check that AXIS OFF works ok")
(command "axis" "off")
(getrslt "Did the axis go away correctly? ")
;make sure erase highligts the pline. but cancel the erase
;we need the pline for later.
(starttest "Next, check that the PLINE HIGHLIGHTS when erased.")
(command "erase" "l" (slowpick))
; cancel before its done
(command)
(getrslt "Did the PLINE HIGHLIGHT? ")
;make sure erase works
(starttest "Next, fully ERASE the PLINE (we won't cancel the erase)")
(command "erase" "l" "")
(getrslt "Did the PLINE, and only the pline, ERASE completely? ")
;make sure oops works...
(starttest "Make sure OOPS brings the PLINE back")
(command "oops")
(getrslt "Did the whole PLINE re-appear? ")
;make the pline into a wide pline
(starttest "Now, let's make a WIDE PLINE.")
(graphscr)
(wait 200)
(command "pedit" "l" "w" "1" "")
(getrslt "Does the WIDE PLINE show up properly? ")
(starttest "Next check that the WIDE PLINE HIGHLIGHTS correclty")
(command "erase" "l" (slowpick))
(command)
(getrslt "Did the WIDE PLINE HIGHLIGHT completely? ")
(starttest "Next check that the WIDE PLINE ERASEs completely.")
(command "erase" "l" "")
(getrslt "Did the WIDE PLINE ERASE completely, without erasing other stuff? ")
;now lets check highlighting of a wide pline drawn on top of it self...
(starttest "Next check that a WIDE HORIZONTAL PLINE drawn back on itself HIGHLIGHTS ok")
(command "pline" (getvar "viewctr") "w" "1" "1" "@4<0" "@2<180" "")
(wait 200)
(command "erase" "l" (slowpick))
(command)
(getrslt "Did the pline highlight properly? ")
; now lets do an erase last from the textscr
(starttest "Now check if ERASE L from TEXTSCR works ok")
(textscr)
(command "erase" "l" "")
(graphscr)
(getrslt "Did the pline get erased completely? ")
(starttest "Now check that wide arced plines (DONUTs) DRAW correctly")
; use donut command....
(setq x (* 2 (car ctrpt)))
(setq y (* 2 (cadr ctrpt)))
(setq id (/ (getvar "viewsize") 2))
(setq od (min x y))
(command "donut" id od ctrpt "")
(getrslt "Did the DONUT draw properly? ")
(starttest "Now check that the DONUT HIGHLIGHTS completely")
(command "erase" "l" (slowpick))
(command)
(getrslt "Did the DONUT HIGHLIGHT completely? ")
(starttest "And now let's check if the DONUT ERASEs completely")
(command "erase" "l" "")
(wait wtime)
(getrslt "Did the DONUT ERASE completely? ")
;now make sure redraw doesn't mess things up
(starttest "Let's put the PLINE and DONUT back, then do a REDRAW")
;put the donut back
(command "oops")
(wait 200)
;put the pline in
(setq ctrpt (getvar "viewctr"))
(setq x (car ctrpt))
(setq y (cadr ctrpt))
(setq x (* 2 x))
(setq y (* 2 y))
(graphscr)
(command "pline" (list 0 0)
(list x 0)
(list x y)
(list 0 y)
(list 0 0)
ctrpt ""
)
(wait 200)
(print "REDRAW")
(wait 200)
(command "redraw")
(getrslt "Did the REDRAW work correctly? ")
;make sure regen works to...
(starttest "Now we'll to a REGEN")
(command "regen")
(getrslt "Did the REGEN work ok? ")
;get rid of the pline and the donut
(command "erase" "l" "")
(command "erase" "l" "")
; check status line with SNAP, ORTHO
(if (= "Y" status)
(progn
(starttest "Check STATUS line after SNAP, ORHTO on")
(command "snap" "on")
(wait 250)
(command "ortho" "on")
(getrslt "Did SNAP, ORTHO get set in status line? ")
; make sure flip screen doesn't lose them or the coords
(starttest "Check flip screen doesn't loose SNAP & ORTHO, and Coordinates")
(textscr)
(graphwait)
(getrslt "Did SNAP, ORTHO and the Coordinates appear in status line? ")
; get rid of them
(starttest "Turn off SNAP and ORTHO")
(command "snap" "off")
(wait 250)
(command "ortho" "off")
(getrslt "Did SNAP and ORTHO get taken out of status line? ")
; check that layer shows up in the status line
(starttest "Change the LAYER. Does the status line show the layer? ")
(command "layer" "new" "new" "set" "new" "")
(getrslt "Did Layer 'NEW' show up in status line? ")
(command "layer" "s" "0")
(command)
)
; end that progn
)
; and that if
; if prompt area
(if (= "Y" comnd)
(progn
;check a long prompt like pline
(starttest "Now check that a long prompt fits in the command prompt area")
(setvar "cmdecho" 1)
(command "pline" (getvar "viewctr"))
(command)
(setvar "cmdecho" 0)
(getrslt "Did the Pline prompt fit in the command prompt area? ")
;now let's make sure at least 3 lines show up in command prompt area
(starttest "Make sure command prompt area scrolls")
(print "line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1 line 1")
(print "line 2 line 2 line 2 line 2 line 2 line 2 line 2 line 2 line 2 line 2")
(print "line 3 line 3 line 3 line 3 line 3 line 3 line 3 line 3 line 3 line 3")
(getrslt "Were there 3 lines in the command prompt area? ")
; check HIDE scrolling
(starttest "Make sure 'Removing hidden lines #' doesn't get in graphics area")
; insert a hide dwg, zoom e and hide it
(command "insert" "hide" "0,0" "1" "1" "0")
(command "zoom" "e")
(wait 250)
(command "vpoint" "1,2,3")
(command "hide")
(getrslt "Did hidden lines message stay out of drawing area? ")
(command "vpoint" "0,0,1")
(command "erase" "w" (getvar "extmin") (getvar "extmax") "")
; end that progn of if prompt area
)
; and that if
)
;!!!!!! now make sure zoom w doesn't mess anything up
;draw some horizontal lines on right hand side of screen
;and zoom in on them...this is only meaningful for menu area off?
; INTERACTIVE TESTS:
(load "int")